home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / CDROM / IDE-fix / CD32.lha / CD32 / Make HD Startup < prev    next >
Text File  |  1997-03-05  |  6KB  |  262 lines

  1. ;$VER: CD32 HD-Install 43.1 (09.02.97)
  2. ;Copyright © 1994 Elaborate Bytes, Oliver Kastl
  3.  
  4. (onerror
  5.     (if (exists "S:Startup-Sequence.std")
  6.         (
  7.         ( protect "S:Startup-Sequence.std" "-e +rwsd" )
  8.         (if (exists "S:Startup-Sequence")
  9.             (
  10.             ( protect "S:Startup-Sequence" "-e +rwsd" )
  11.             (delete "S:Startup-Sequence")
  12.             )
  13.         )
  14.         (rename "S:Startup-Sequence.std" "S:Startup-Sequence")
  15.         )
  16.     )
  17.     (makeassign "CD32Inst" (safe))
  18. )
  19.  
  20. (set #wbversion (getversion "libs:version.library"))
  21. (set #wbversion (/ #wbversion 65536) )
  22.  
  23. (set #Expansion 1)
  24.  
  25. (set @default-dest "")
  26.  
  27. (complete 0)
  28.  
  29. (if (< #wbversion 39)
  30.     ((abort "\n\nAmigaDOS 3.0 or higher is required for the CD32-Emulator! "
  31.              "\n\nAn upgrade will be needed for your Amiga." )
  32. ))
  33.  
  34.  
  35. (message
  36.     "\nThis program will install or remove a special \"S:Startup-Sequence\" for the CD32-Emulator. "
  37.          "With the help of this, you may directly boot from a CD32-CD if you press a function key during boot. "
  38.          "\n\nIf you wish to install, the CacheCDFS MUST be already installed and running! "
  39.        "\n\nWARNING: This program MUST NOT be started from the CDFS Install Disk!"
  40.         )
  41.  
  42. (makeassign "CD32Inst" "" (safe))
  43.  
  44. (if (NOT (exists "CD32Inst:PutPrefs"))
  45.     (
  46.     (abort "\n\nCould not find the PutPrefs program!")
  47.     )
  48. )
  49.  
  50. (set #install
  51.     (askbool
  52.         (prompt "\n\nDo you wish to install or remove the special \"S:Startup-Sequence\" ?")
  53.         (help   "Choose if you wish to install, or if you wish to remove an installation.")
  54.         (default 1)
  55.         (choices "Install" "Remove")
  56.     )
  57. )
  58.  
  59. (if (NOT #install)
  60.     (
  61.     (if (exists "S:Startup-Sequence.std")
  62.         (
  63.         ( protect "S:Startup-Sequence.std" "-e +rwsd" )
  64.         (if (exists "S:Startup-Sequence")
  65.             (
  66.             ( protect "S:Startup-Sequence" "-e +rwsd" )
  67.             (delete "S:Startup-Sequence")
  68.             )
  69.         )
  70.         (rename "S:Startup-Sequence.std" "S:Startup-Sequence")
  71.         )
  72.     )
  73.     (if (exists "C:KeyCheck")
  74.         (
  75.         (user 2)
  76.         (delete "C:KeyCheck" 
  77.             (help "Select \"Proceed\", if you want C:KeyCheck to be deleted.")
  78.             (prompt "\n\nDelete C:KeyCheck ?")
  79.             (confirm)
  80.         )
  81.         )
  82.     )
  83.  
  84.     (makeassign "CD32Inst" (safe))
  85.     (exit)
  86.     )
  87. )
  88.  
  89. (set #CDDevice_NC "CD0" )
  90.  
  91. (set #CDDevice_NC
  92.     (askstring
  93.         (prompt "\n\nWhat is the name of the CD-ROM device?\n\n"
  94.         "(The trailing colon MUST NOT be present)" 
  95.         )
  96.         (default #CDDevice_NC )
  97.         (help "\n\nThis is the name under which AmigaDOS references the "
  98.                 "CD-Rom as.  While usually "
  99.                 #CDDevice_NC
  100.                 ", it can be any name you choose. "
  101.                 "\n\nThe trailing : (colon) MUST NOT be present." )
  102.     )
  103. )
  104.  
  105. (complete 30)
  106.  
  107. (working "\n\nLaunching the FindCD32 program to find "
  108.          "the Device and Unit of your CD-Rom..."
  109.          "\n\nNote that the CacheCDFS MUST be already installed and running!")
  110.  
  111. (if (NOT (exists "CD32Inst:FindCD32"))
  112.     (
  113.     (abort "\n\nCould not find the FindCD32 program!")
  114.     )
  115. )
  116.  
  117. (set #Product ( run (cat "CD32Inst:FindCD32 " #CDDevice_NC) ( safe ) ) )
  118.  
  119. (if ( NOT (= #Product 0) )
  120.     (
  121.     (abort "\nCould not find your CDROM hardware!"
  122.              "\n\nThe CacheCDFS MUST be already installed and running! "
  123.           "\n\nYour CD-Rom MUST be installed as " #CDDevice_NC "!")
  124.     )
  125. )
  126.  
  127. ( set #CDROM_Device (getenv "CDROM_Device" ))
  128.  
  129. (complete 50)
  130.  
  131. (set #FKey
  132.     (askchoice
  133.         (prompt "Select the funktion key which starts the CD32-Emulator during bootup")
  134.         (help "\n\nHere you must select the function key you wish to use for "
  135.               "booting into CD32-Emulation. If you press this key while you "
  136.               "boot, the CD32-Emulator will be started instead of your normal "
  137.               "\"S:Startup-Sequence\".")
  138.         (default 9)
  139.         (choices "F1" "F2" "F3" "F4" "F5" "F6" "F7" "F8" "F9" "F10")
  140.     )
  141. )
  142.  
  143. (set #FKey (+ #FKey 50))
  144.         
  145. (set #CD32_Name "NotPresent")
  146.  
  147. (if (exists "CD32Inst:CD32-Demo" )
  148.     (
  149.     (set #CD32_Name "CD32-Demo")
  150.     )
  151. )
  152.  
  153. (if (exists "CD32Inst:TandemCD32" )
  154.     (
  155.     (set #CD32_Name "TandemCD32")
  156.     )
  157. )
  158.  
  159. (if (exists "CD32Inst:CD1200_CD32" )
  160.     (
  161.     (set #CD32_Name "CD1200_CD32")
  162.     )
  163. )
  164.  
  165. (if (exists "CD32Inst:CD32" )
  166.     (
  167.     (set #CD32_Name "CD32")
  168.     )
  169. )
  170.  
  171. (if (= #CD32_Name "NotPresent")
  172.     (
  173.     (abort "\n\nCould not find a CD32-Emulator!")
  174.     )
  175. )
  176.  
  177. (set #CD32_Path (getassign "CD32Inst"))
  178.  
  179. (CopyLib
  180.     (source "CD32Inst:KeyCheck")
  181.     (dest "C:")
  182. )
  183.  
  184.  
  185. (if (exists (tackon "DEVS:" #CDROM_Device) )
  186.     ((set #Expansion 0))
  187. )
  188.  
  189. (if #Expansion
  190.     (
  191.     (set #Expansion ( NOT (askbool
  192.         (prompt "\n\nIs your CD-Rom controller an Autoboot controller ?")
  193.         (default 0 )
  194.         (help "\n\nChoose \"YES\" if your controller is an autoboot controller "
  195.                 "and \"NO\" if not!")
  196.  
  197.         ))
  198.     ))
  199. )
  200.  
  201. (if #Expansion
  202.     (
  203.     (set #BindDrivers "    C:BindDrivers\n")
  204.     )
  205. )
  206.  
  207. (if (NOT #Expansion)
  208.     (
  209.     (set #BindDrivers "")
  210.     )
  211. )
  212.  
  213. (complete 80)
  214.  
  215. ( protect "S:Startup-Sequence" "-e +rwsd" )
  216.  
  217. (if (NOT (exists "S:Startup-Sequence.std" ))
  218.     (
  219.     (rename "S:Startup-Sequence" "S:Startup-Sequence.std")
  220.     )
  221. )
  222.  
  223. (textfile
  224.     (dest "S:Startup-Sequence" )
  225.     (append ";**********************************************************\n"
  226.               ";*  CD32-Emulator © 1994 - 1997 Elaborate Bytes, O. Kastl *\n"
  227.               ";**********************************************************\n")
  228.     (append "\n")
  229.     (append "C:Assign T: RAM:\n")
  230.     (append "C:Assign ENV: RAM:\n")
  231.     (append "C:KeyCheck " #FKey "\n")
  232.     (append "if warn\n")
  233.     (append #BindDrivers)
  234.     (append "    ")
  235.     (append (tackon #CD32_Path #CD32_Name) "\n")
  236.     (append "endif\n\n")
  237.     (append "C:Execute S:Startup-Sequence.std\n")
  238.     (append "EndCLI >NIL:\n")
  239. )    
  240.  
  241. ( protect "S:Startup-Sequence" "-e +rwsd" )
  242.  
  243. ( if (NOT @pretend )
  244.     ((if ( run "CD32Inst:PutPrefs NonLace" )
  245.     (
  246.     (abort "\n\nPutPrefs program failed!")
  247.     ))
  248. ))
  249.  
  250. (complete 90)
  251.  
  252. (tooltype
  253.     (dest (tackon "CD32Inst:" #CD32_Name) )
  254.     (settooltype "DOSDEV" #CDDevice_NC )
  255.     (noposition)
  256. )
  257.  
  258. (complete 100)
  259.  
  260. (makeassign "CD32Inst" (safe))
  261.  
  262.